﻿using Prism.Events;

namespace IceCreamMachine.Services
{
    /// <summary>
    /// 窗口一的服务抽象类
    /// 封装加工过程
    /// </summary>
    abstract class IceCreamServiceBase1 : ICanMakeIceCream
    {
        protected Tracer Monitor;
        public IEventAggregator EventAggregator;
        public abstract void AddChocolates();

        public abstract void AddIceCream();

        public abstract void AddStrawberry();

        public void MakeIceCream(Tracer monitor, IEventAggregator eventAggregator)
        {
            Monitor = monitor;
            EventAggregator = eventAggregator;
            Monitor.Message += "\n 一号窗口开始制作冰激凌";
            AddStrawberry();
            AddChocolates();
            AddIceCream();
            Monitor.Message += "\n 一号窗口制作完成冰激凌";
            Monitor.Message += "\n ========================================";
        }
    }
}
